fix health calculation bug