Fixed regression with env handling