Fix deprecation warning
Merge pull request #2 from datacentred/deprecation_fix

Fix deprecation warning