# Incorrect Hyperref links with memoir and breqn

Consider the following MWE

\documentclass[11pt,oneside]{memoir}

\usepackage{breqn}
\usepackage{hyperref}

\begin{document}
\mainmatter

\begin{dmath}\label{eq:1}
1 + 1 = 2,
\end{dmath}
\newpage
\begin{dmath}\label{eq:2}
1 + 1 = 2,
\end{dmath}

\newpage
\ref{eq:2}

\end{document}


where after running the document through pdflatex a couple of times we find that clicking on the reference to equation 2 actually takes us to equation 1. If the dmath blocks are replaced with regular equations everything works as expected.

This might be an incompatibility between hyperref and breqn. You can get around this by using the equation environment or by setting a verbatim \phantomsection before your dmath environment:

\documentclass{book}

\usepackage{breqn}
\usepackage{hyperref}

\begin{document}

\phantomsection
\begin{dmath}[label={eq:1}]
1 + 1 = 2,
\end{dmath}

\newpage
\phantomsection
\begin{dmath}[label={eq:2}]
1 + 1 = 2,
\end{dmath}

\newpage
See equation~\ref{eq:2}.

\end{document}