Avoid deprecation warnings.