fixing EOF