Fix deprecation warning

Closes #11
Closes #10
Merge pull request #12 from richrace/fix-deprecation-warning

Fix deprecation warning