How to avoid a war with China