fixed bugs in accept() having to do with EOF