fix reference to db.