Bugfix on the energy system.