fixed updateFn, patchFn