fix removeEnv bug (BranchNZ)