China remains a magnet for foreign investment