Fix deprecation warnings
Merge pull request #64 from ebfe/fix-deprecation

Fix deprecation warnings