fixed a bug that specified database was not used...