Fix DeprecationWarning