Bug fix: Taking keyboard input only when player is alive.