Minor tweaks to db utils.