prevent error when returning to document list from unprepared doc
Merge branch 'master' into mass_prepare