fix close win bug