Some little tweaks for db stuff