fix up the EOF errors