Got rid of deprecation warnings.