Reduce deprecation warnings