Fixing requestPDF error