Fixed a couple of deprecation warnings