fixed sample bug