added progress to adding pages to database, fixed saving on destroyed app