more attempts at EOF fixing