Fix issue with embedded records