bug fixing for checking winning status