RF: fixed the nifti writeout