bugfixes in energy control