Fixing crash from example code in Readme

The example code in the read me would cause a deprecated error when trying to load a page.