fix the issue when setting is null, the event can't be unbind from global docs