fix mac osx 10.9 fail
make EOF consistent