Fixed string -> number error in energy.lua