Fixed energy bug