some improvements on querywindow, little bit dirty because of changes in autogenerated GUIfile