Fix bug with IsDefeated counting