Bug fixing on the EnergyCell class