fix deprecation warnings
Merge pull request #815 from dgorissen/patch-2

fix deprecation warnings