Fixed the EOF errors