Fixed a deprecation warning