fix some patches