fixed bugs in example