Fixed bug with min/max on updating dataset