Fixed two deprecation warnings.