fix bugs in example