Fixed bug where getEnv triggered warning on default controller