Fixed stubborn deprecation warnings.