window title handling corrected