fix 'saved' status of retrieved docs
Merge pull request #1 from wezs/master

retrieving document from DB error