fixing ai logic win before block