fixes leak in open inputstreams