fix nan background problem in nifti file