Fix deprecation warnings.
Merge pull request #6 from ntessore/pr-c3da510

Fix deprecation warnings.