improved window title behaviour