Fixed wrong values being returned for energy used by a machine.