improve performance for getting complex types
Merge branch 'release/v0.5.1'