fixes for embedding