fix some bug in examples