Espargaro salvages third place on difficult weekend