close env after done (#2162)
close env after done (#2162)

* close env after done

* fix if

Co-authored-by: He Chen <7103e8dc91b536f531c15f4b5ef82694de2d31fc@bloomberg.net>
Co-authored-by: J K Terry <fd470d697b6449d3a775e543147311841dbfe3da@gmail.com>
Farama-Foundation/Gymnasium,Farama-Foundation/Gymnasium