Fixed deprecation warnings.
Merge pull request #167 from leonkunert/master

Fixed deprecation warnings.