Fix for timeout when generating the TEI datastream.