fix cmdline behavior