Fix critical bug with Embedded Documents