fix bug with update on data