Merge "Remove an unnecessary InputStream and prevent leaking memory." into nyc-dev