[Fix] Negative energy bug
[Fix] Saving and loading environments (energy and type)