fixing check for player invincible