fixed the negative hitpoints issue

fixed the negative hitpoints issue