Fixed bug with total energy

1 job for master in 5 minutes and 15 seconds