fix bugs that db 's names are not used