bug fix of command line mode