fixed win condition checker