Commandline parsing fixes