Fix deprecated method usage in example projects