Fixed bugs in docmap