fixed mainwindow popup in script