Viñales battles through injury for second on grid