Close window when done.