Trying to remove deprecation warnings