fixing bug whereby for an added element or removed element, the method w...

...ill be called on the absent object, causing a NPE