Who did the Ming dynasty showed favors to?