Corrected winning condition