embedding bug fix