bug fix in copy sample