fix memleak when using input streams