Adding support for complex object.