fixed bug with embeding