Fixed the bugs in multidim_fft2.