onUpdate event fix