Fixed bug in decoding objects.
Merge branch 'test' into dev