allow write tlv instance + bug fix

It seems `objects.c` support to write an instance. So I edit management.c to allow this.
(+ a little bug fix on `objects.c`)