Fixed getting the battery percentage