fixed energy bug