fix connection to the db