[kb] several small bugs fixed