fix bug that left document_type blank