Shift during alignment

I am having an issue when aligning and then manually stitching images that black space on part of the borders appears. This is because some of the images (1x3) are shifted up or down, causing this blank space. Is there anything I can do to prevent this?

This how I am stacking and then unstacking to save:

run(“Images to Stack”, “method=[Copy (center)] name=” + WELLNAMES[w] + “" + i + “stack title=[] use");
//Then register them.
run(“MultiStackReg”, “stack_1=” + WELLNAMES[w] + "
” + i + “stack action_1=Align file_1=[" + OUTPUTDIR+ “stacked_registered/”
+ CHANNELS[ch] + "/well
” + WELLNAMES[w] + "/well
” + WELLNAMES[w] + “_” + i + “_stack_matrix.txt] stack_2=None action_2=Ignore file_2= transformation=[Translation] save”);

  		//Background subtract the stack before saving.
    	run("Subtract Background...", "rolling=" + RB_BALL_RADIUS + " stack");

		//ID of active image
		id = getImageID;
		//Loop through all slices in stack to copy and save individually 
		for (n=1; n<= nSlices; n++) {
  			showProgress(n, nSlices);
  			selectImage(id);
  			setSlice(n);
 			name = getMetadata;
  			run("Duplicate...", "title=temp");
  			newPath = OUTPUTDIR+ "stacked_registered/" + CHANNELS[ch] + "/well_" + WELLNAMES[w] 
  			+ "/T" + n + "/" + field_filelist[n-1];
  			saveAs("tif",newPath);
  			close();

This is how I am stitching:
//Get image dimensions
getDimensions(width, height, channels, slices, frames);
//Get bit depth
Depth=bitDepth();
//Create blank image for stitching fields
newImage(“Untitled”, Depth+" black", width*3, height, 1);

	//Loop through all open windows (windows==fields) 
	//Paste registered images together 
	selectWindow(tp_filelist[0]);
	run("Select All");
	run("Copy");
	selectWindow("Untitled");
	makeRectangle(0, 0, width, height);
	run("Paste");
	selectWindow(tp_filelist[1]);
	run("Select All");
	run("Copy");
	selectWindow("Untitled");
	makeRectangle(width, 0, width, height);
	run("Paste");
	selectWindow(tp_filelist[2]);
	run("Select All");
	run("Copy");
	selectWindow("Untitled");
	makeRectangle(width*2, 0, width, height);
	run("Paste");

	save(imgpath);

Dear slis
Can you post some example of the issue you are having? Since you are presumably aligning the images based on some feature in the center of the images, it would make sense for their to be blank areas in the final image where the edges of the images no longer align.