fixing next in TEXTIOWrapper