fix bug with checking winner