Fixed issue where the default environment would get set to "undefined"