Environment Bug fixes