parse_cmd bug fixing