Fix error 500 in documents.
Merge pull request #1 from thambley/master

Fixes error 500 on documents#show