Fix embedded document class lookup

Get the class rather than the class name