diff --git a/tracy/tracy/doc/Soltracy3_UserManual_developer.docx b/tracy/tracy/doc/Soltracy3_UserManual_developer.docx
index 5b3b9f915ad8723351286565b998f8d9a72f7944..f0eb2ddec442c8addb66d6645dc377262cc11b65 100644
Binary files a/tracy/tracy/doc/Soltracy3_UserManual_developer.docx and b/tracy/tracy/doc/Soltracy3_UserManual_developer.docx differ
diff --git a/tracy/tracy/src/soleillib.cc b/tracy/tracy/src/soleillib.cc
index 985973899e776cf370b9dee7f763ab058cf2f067..b774ce46e6ddaad1197062efc7e302830be7a4b9 100644
--- a/tracy/tracy/src/soleillib.cc
+++ b/tracy/tracy/src/soleillib.cc
@@ -430,7 +430,7 @@ void SetErr2(long seed,double fac)
 	       1) line begin with "#" is comment line
 	       2) first line Name1: Start
 	          first line Name2: All
-	       3) MK1 and MK2 should be unique in the lattice
+	       3) the numbers of MK1 and MK2 should be  the same in the lattice
 	       4) MK1 is defined before MK2 in the lattice
 	       5)
 	         MK1:  marker before the start element of the section for the aperture
@@ -466,7 +466,7 @@ void ReadCh(const char *AperFile)
  char    in[max_str], Name1[max_str], Name2[max_str];
  char    *line;
   int     Fnum1=0, Fnum2=0, Kidnum1=0, Kidnum2=0, k1=0, k2=0; 
-  int     i=0, LineNum=0;
+  int     i=0, j=0,LineNum=0;
   double  dxmin=0.0, dxmax=0.0, dymin=0.0, dymax=0.0;  // min and max x and apertures
   FILE    *fp;
   bool  prt = false;
@@ -504,7 +504,7 @@ void ReadCh(const char *AperFile)
         
       else {
         /* read the vacuum chamber between section */
-    	  Fnum1 = ElemIndex(Name1);
+    	Fnum1 = ElemIndex(Name1);
 	Fnum2 = ElemIndex(Name2);
 	if(Fnum1>0 && Fnum2>0) {
 	  /* if element Name1 is defined before element Name2, give error message*/
@@ -517,10 +517,10 @@ void ReadCh(const char *AperFile)
 	  /* if the element is not unique in the lattice, give error message*/
 	  Kidnum1 = GetnKid(Fnum1);
 	  Kidnum2 = GetnKid(Fnum2);
-	  if(Kidnum1 > 1 || Kidnum2 >1){
+	  if(Kidnum1 != Kidnum2){
 	   printf("\nReadCh(): \n"
-	          "          aperture file, Line %d, Element %s or Element %s is not unique in lattice \n",
-	            LineNum,Name1,Name2);
+	          "          vacuum aperture file, Line %d, the number of Element %s is not equal to",
+		  " the number of  Element %s in lattice \n", LineNum,Name1,Name2);
             exit_(1);
 	  }
 	   
@@ -528,21 +528,25 @@ void ReadCh(const char *AperFile)
 	    printf("setting apertures to section:\n"
 		   "  %s  %s dxmin = %e, dxmax = %e, dymin = %e, dymax = %e\n",
 		   Name1, Name2, dxmin, dxmax, dymin, dymax);
-	/* find the start and end index of the section*/
-	  k1 = Elem_GetPos(Fnum1, 1);
-	  k2 = Elem_GetPos(Fnum2, 1);
+	
+	
 	/* set the vacuum chamber*/
 	//read the marker before the first element, and the markder after the last elment
-	  for(i=1; i<globval.Cell_nLoc; i++){
-	    if(i>=k1 && i<k2){
-	      Cell[i].maxampl[X_][0] = dxmin;
-	      Cell[i].maxampl[X_][1] = dxmax;
-	      Cell[i].maxampl[Y_][0] = dymin;
-	      Cell[i].maxampl[Y_][1] = dymax;
-	    }
-	  }  
-	} 
-	else {
+	  for(i=0;i<Kidnum1;i++){
+	    /* find the start and end index of the section*/
+	    k1 = Elem_GetPos(Fnum1, i+1);
+	    k2 = Elem_GetPos(Fnum2, i+1);
+	    
+	    for(j=1; j<globval.Cell_nLoc; j++){
+	      if(j>=k1 && j<k2){
+	        Cell[j].maxampl[X_][0] = dxmin;
+	        Cell[j].maxampl[X_][1] = dxmax;
+	        Cell[j].maxampl[Y_][0] = dymin;
+	        Cell[j].maxampl[Y_][1] = dymax;
+	      }
+	   }
+	 }  
+       }else {
 	  printf("\nReadCh(): \n"
 	         "          aperture file, Line %d, lattice does not contain section between element %s and element %s\n", 
 	          LineNum,Name1, Name2);