close window problem fixed