Fix energy not being produced properly.