Fix bugs in example

fix bugs in example