Fix some deprecation warnings
Merge pull request #95 from tomaka/fix-deprecation-warnings

Fix some deprecation warnings