Fixed some bugs with command arguments