fix db connection.
cleanup