Fix error with EM command in CLI mode