fixed bug in fetch_docs