fixed compile time errors in examples