fix close input stream