Fix a few deprecation warnings