added assertion after deleting the env