hp calculation fix