Fix 'Deprecated' warnings in examples