changed main window to be parent in all cases