Fix wrapped input stream