fix shadowing of env