end dialog of client gets closed when main window is closed