changed order of command parsing, fixed limit checking for arguments