Fixed a few deprecation warnings