fix total ah bug