fix energy bug
fixed bug