Fixed a error 'objectAdded/objectRemoved is not a function'