make sure env.enable is set before trying to use it