Mac MainWindow Crash Fixes

* refresh popup resize mainwindow crash
* tabbar button crash coz on left not right on Mac