minor tweak to embedding code