battery level measurement fix