remove env in test correctly