fix crash from eof on sdtin in iosh