fix bug, close all windows now works