fixed a bug when creating a new env