Fix bug in example code