The popup about changes on server did not exit the application (as it actually sais it will do). Was due to calling Window Close from another thread.