fix reallocate on update