# Memoir chapter style different heading gap chapter and chapter*

I am using a custom chapter style for my thesis, but I am struggling to get consistent chapter heading gaps between chapters without a number (chapter*{}) and chapters with a number (chapter{}). See examples below:

MWE:

\documentclass[openany]{memoir}

\usepackage{lipsum}

% chapter style
\makechapterstyle{mit}{%
\renewcommand{\printchaptername}{\chaptername\ }
\renewcommand{\printchapternum}{%
\thechapter
}%
\renewcommand{\afterchapternum}{\par}%
\renewcommand{\printchaptertitle}[1]{%
{\raggedright\large\setSpacing{1.5}\textbf{##1}\\\rule{\linewidth}{0.2pt}}
}
\renewcommand{\afterchaptertitle}{\par\nobreak\vskip0.5\baselineskip}%
}

\begin{document}
\chapterstyle{mit}

\chapter*{Acknowledgements}
\lipsum[1]

\clearpage
\tableofcontents*

\chapter{Introduction}
\lipsum[1]

\chapter{Background}
\lipsum[1]

\chapter{Conclusion}
\lipsum[1]

\end{document}


Any idea how to get those gaps between the rule and the start of the text consistent between different chapters and table of contents?

This was a problem with the printchaptertitle command.

The updated chapterstyle:

\makechapterstyle{mit}{%
\renewcommand{\printchaptername}{\chaptername\ }