fixed bug in examples