fix double output of objects implementing Map and Iterable interfaces