Fixed bugs in datasets.py