fix sample errors