Fix crash when user presses cancel on 'Save as' dialog