more db_connect tweaks