fixed bugs with struct types of nodes; some fixes in knowledge base