Fix a typo in the sample programs, and update API docs.