Fix Cli execution bugs