quick hacks to make binary eof work right