What did China agree to do once the Treaty of Nanjing was signed?