Fixed environment setup for engine.