Minor tweaks to the db connection