I am looking for a reference to the following statement "Let G$G$ be a reductive algebraic group and K$K$ a maximal compact subgroup of G$G$. If H$H$ is a dense subgroup in K$K$, then the centralizer of H$H$ in G$G$ is equal to the centralizer of K$K$ in G$G$ and they are equal to the center of G$G$." I have a proof but I think this is a known result, I can´t find a reference.