Fixed bug with not resetting prevRMS in Energy