fix sample bug