I am using the fphw.cls (gitlab link) class for my assignment template. But I have found that the hyperlink on my ToC to bibliography is not properly working. When I click on the bibliography section at my ToC (on PDF), it takes to the previous page of the bibliography. The problem is appearing only in the bibliography. The other hyper-references are working okay.
Here's my MWE:
\documentclass{fphw} % Link to the fphw.cls file: https://gitlab.com/fportales/fphw/-/blob/master/fphw.cls
\usepackage[sorting=none]{biblatex}
\usepackage[
hidelinks, % for removing the borders around clickable cross-references and hyperlinks
bookmarksopen, % for PDF specific display option
bookmarksnumbered, % for PDF specific display option
]{hyperref}
\usepackage{bookmark} % A new bookmark (outline) organization for hyperref
\usepackage{lipsum}
\title{ToC to Bibliography Problem}
\addbibresource{ref_qm.bib}
\begin{document}
\pdfbookmark[section]{\contentsname}{toc}
\tableofcontents
\newpage
\section{section name}
\lipsum[1][5]\cite{book:griffiths} \ \lipsum
\section{section name}
\lipsum[2][5]\cite{book:balakrishnan} \ \lipsum
\newpage
\printbibliography[heading=bibintoc]
\end{document}
How can I solve the issue? The fphw.cls file contains 126 lines of codes. That's why I haven't put it here. Kindly check the link.