Get rid of deprecation warnings