Fix deprecation warning
Merge pull request #10 from julz/fixdeprecation

Fix deprecation warning