Fix some bug in examples.