Fixed a deprecation warning.