Fix closing dataset service db connections