fix a bug in kb