fix cores in catdb logic.