Fix use of deprecated method
Merge pull request #3 from moleman/fix-deprecated

Fix use of deprecated method