Fix issue where datasets cannot be discarded