fixed the stream position for xsl save

fixed the stream position for xsl save