Fix issue in sample code