fixed some bugs at cli input