Fixed deprecation warnings
Merge pull request #304 from jamesrhurst/fix-deprecations

Fixed deprecation warnings