Fixes example

I was getting `Error: Method object must have a method property` when running the example file and that seemed to have fixed the issue.