Fix cast bug on getHP/getMaxHP, closes #13