Fixing bug for concurrent requests in pdfgen module