Fixed bugs when player is dead