I realized that I sometimes write :
\begin{figure}
...
\label{fig:foo}
\caption{Bla}
\end{figure}
instead of:
\begin{figure}
...
\caption{Bla}
\label{fig:foo}
\end{figure}
Which results in wrong reference numbers.
Is there an easy way to catch all these errors?