fix RemoveAllObjects() method