fix bug in CLI