Fix sample codes