A few fixes for CLI