backwards compatibility for the environment parameter

New and improved version to fix the original fix