fix the wrong code fragment in the sample