fix bug : assure doublet pattern before singlet pattern