Applies patches