fixed bug in example code