fixed commandline parsing bugs (hopefully)