Fixes #2340

That pull request never fixed the EOF