bug fix energyCost
merge