Fixed deprecation call
Merge pull request #1127 from WouterJ/fix_deprecation_call

Fixed deprecation call