fix deprecation warnings.