Fixed bug in check_nifti