fixed dependencies on db.h #869