fix reading patch sequence