Fix EOF character being displayed in premature EOF errors