fix bug in examples