Fix a deprecation warning