fixed takeDamage bug