fix memory crash in the case the dataset was not found on snapshot