Bug fixes from testing the CLI