Fixed #5626: call setUpdateEnabled(false) in onExit function