Avoid deprecation warnings