fixed bug in processing a dataset