Fixed bugs in examples.