Why did Richard the first get captured?

King Richard I was travelling home from the crusades when his ship was wrecked on Italy. He chose to try to continue travelling by crossing Europe by land, disguised as a pilgrim. He was recognized near Vienna by Duke Leopold V of Austria, who had a grudge against Richard because he believed Richard had killed his cousin. Leopold handed Richard over to Emperor Henry VI of the Holy Roman Empire, who held him for ransom.