fixing the preferences menu and win-checking abilities