Fixed errors in example

Fixed some minor errors in the example code