Close window (Click X at top right corner) when finished