fixed bug that prevented closing of modWin