Fixed a bug that crashed the PdfViewer