Fixed bug in DataSetFactory