"This villainy often backfires though, in both ATU 313 “The Magic Flight” and ATU 430 “The Donkey”, a king’s villainy cures the protagonists, in the former, of leprosy, in the latter, of being a donkey." From my encyclopedia article on Kings in folktales