I am using threeparttable to generate a table with notes. However, the a referring to the note is placed outside the table, see picture below. How can I make the note appear inside the table?
\documentclass[11pt]{article}
\usepackage[flushleft]{threeparttable}
\usepackage{booktabs}
\begin{document}
\begin{table}[ht]
\centering
\begin{threeparttable}
\caption{A table}
\begin{tabular}{@{}ll@{}}
\toprule
Column 1 & Column 2 \tnote{a} \\ \midrule
Row 1 & X \\
Row 2 & X \\ \bottomrule
\end{tabular}
\begin{tablenotes}
\small
\item[a] Some note.
\end{tablenotes}
\end{threeparttable}
\end{table}
\end{document}