bug fix for embedded sample