resolve main window conflict