[Solved] Extra period in section labels after redefinition of theparagraph

Niels Karschin Asks: Extra period in section labels after redefinition of theparagraph
I want the paragraphs in my document numerated with lowercase letters, followed by a period. So I added the line renewcommand{theparagraph}{alph{paragraph}} to my document which created the numbering I wanted. A side effect of this was however that periods also appeared after the Chapter/Section/Float numbers in their label (but not their reference!).

MWE:

Code:
documentclass{scrartcl}
renewcommand{theparagraph}{alph{paragraph}}
setcounter{secnumdepth}{4}

begin{document}
section{Foo}label{sec:foo}
ref{sec:foo}
paragraph{Bar}label{sec:bar}
end{document}

produces:


enter image description here

I noticed that this extra period is not added if I redefine theparagraph with arabic. Also, it appears only after the second compilation of the document.

Any suggestions on how to get rid of them are much appreciated.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.