fixed commandline handling