Removing deprecation warnings