Remove deprecation warnings