Use parse_uint in get_target to ensure target id is parsed properly.