Cmdfixes

fix parsing of cmdline options