Some tweaks on db.