bug in energy fixed