bug fix for readin_psf_file