Fixed bug with checking win conditions.