Moved the check for energy value
Mergefix