Thmbox with numbered equation

I would like to use the thmbox package but when the environment contains an equation (align etc.) with a tag then the tag is displayed out of the body, see the example

\documentclass[12pt,a4paper,reqno]{amsart}
\usepackage[czech]{babel}
\usepackage{thmtools}

\declaretheorem[name=TheoremL,thmbox={L,bodystyle={\vspace{1mm}\slshape\noindent}}]{thml}
\declaretheorem[name=TheoremM,thmbox={M,bodystyle={\vspace{1mm}\slshape\noindent}}]{thmm}
\declaretheorem[name=TheoremS,thmbox={S,bodystyle={\vspace{1mm}\slshape\noindent}}]{thms}
\declaretheorem[name=Theorem]{thm}

\usepackage{fancyhdr}
{\pagestyle{fancy}
\fancyhf{}

\begin{document}
\thispagestyle{fancy}

\begin{thm}
Theorem with an equation
$$formula$$
and align
\begin{align}
formula\\$$formula$$\end{align}
\end{thm}

\begin{thml}
Theorem with an equation
$$formula$$
and align
\begin{align}
formula\\$$formula$$\end{align}
\end{thml}

\begin{thmm}
Theorem with an equation
$$formula$$
and align
\begin{align}
formula\\$$formula$$\end{align}
\end{thmm}

\begin{thms}
Theorem with an equation
$$formula$$
and align
\begin{align}
formula\\$$formula$$\end{align}
\end{thms}

\end{document}


Can anybody help me how to move the tag to the right position?

\def\fullwidthdisplay{}%\displayindent\z@ \displaywidth\columnwidth}