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

Fix deprecation warnings