I have a problem using the wrapfigure package. As you'll see in the code example below, when I call \ref{My table} what I get is a reference to the section I am in instead of the table.
\documentclass{article}
\usepackage{wrapfig}
\usepackage{lipsum}
\begin{document}
\section{Section}
\subsection{Subsection}
\begin{wraptable}{l}{0pt}
\begin{tabular}{cccc}
A & B & C & D \\
E & F & G & H\\
\end{tabular}
\label{My table}\caption{This is my table.}
\end{wraptable}
\textbf{Table \ref{My table} should be called Table 1.}
\lipsum[2]
\end{document}
Thanks!

