fix the bug in for_dataset.py