Added missing EncodeObject.