Getting rid of deprecation warnings.