and fix embedAsObject as well