Fixed bug in decoding objects.