added eof to port flags, to make it work again