Corrected deprecation warnings.