fix a bug where the last argument in a command can't contain whitespaces