fixing the db connection