Yuan firms, but heads for biggest weekly drop since January