Stefan Kung swept to victory on Stage 4 in the individual time trial after Enric Mas suffered an unfortunate puncture in the final kilometre.