Fix some deprecation warnings.