Some fixes for document