Fix loading resources via InputStream