fixing typo in sample that was causing panics