fixed bug in search for win