China's factory activity contracts in May, but there are signs of improvement