Fix sample code error