Fix bug with embedded structures
Added test of support for embedded structures