fix for 2d slices in applyJ&T

Fixed a bug that Tristan and I found for 2D input and output slices on a component with ApplyJ or ApplyJT.