fixed bug in doc_check