Apply various patches