Fixed EOF issue for Linux.