Fixed bug when AI wins