fixed input stream leaks in iOS7