Fix commandline handling