Fix some deprecation warnings
Merge pull request #23 from ninech/fix-deprecation-warnings

Fix some deprecation warnings