patch to correct shift pattern if it is in the form [[a,b],[b,c]]