Avoided deprecation warnings.