fixed bug when changing data sets