fixed some bugs in knowledge base