fix the bug that did not apply chunking the dataset.