fixed main window issue, which came due to popup fix