Fixed bug on embedding