Properly apply patches.