fixed minor problems in example code.