Fix Bug #1649 (Save dialog does not close automatically)