Fixed the error and made win checks work