Update dbCore.py

fix bugs