Fixing the energy logic!