Added checking for defeat cases