Weaning away foreign investment from China