fix bugs in method get_documents_filds