Fixed bug in db.