Avoid division by zero if the battery cannot hold a charge