Fix error when taking damage.