Corrections for exporting the db and managing the progress dialog