Resolved a few deprecation warnings.