Bug fixes in the documents menu