Ecuador's Jhonatan Narvaez won stage four of the Giro d'Italia in Cosenza, southern Italy, three days after being caught up in a major crash that forced three of his UAE Emirates-XRG team-mates to abandon the race.