fix db connection. minor tweaks