fix compile error in examples