fixed bug in hp calculation.