fixes bug when stitching volumes in the xz and yz planes