fix crash when maximize window
fix crash when aborting save dialog