Fix battery widget logic error