Fixed bug in example code