Fix patch application.