fixed never ending loop in commandline parsing