adds some rescues
hides doc table unless a document is present