fixed a dataset assignment bug