added guard to data source destroy