Fix deprecated calls
Merge pull request #3 from robenkleene/fix-deprecations

Fix deprecated calls