Fixed bug in dataset loading