When I use the soul package combined with the cite package to highlight some text that contains tilde and citation (e.g. \hl{Ref.~\cite{xyz}}, I get unwanted extra space between the word "Ref." and the citation number.

I put tilde here because I don't want LaTeX to interpret the dot as the end of the sentence.
Here is my MWE:
\documentclass{article}
\usepackage{xcolor,soul}
\soulregister\cite7
\usepackage{cite} % error disappears without this package
\begin{document}
\hl{Ref.~\cite{xyz}}
Ref.~\cite{xyz}
\end{document}
Here, I have used \soulregister\cite7 as suggested in How to make \hl (highlighting) to automatically place incompatible commands in \mbox?
I need the cite package to contract [1,2,3,4] to [1-4] (I don't have this in MWE, but I do in my actual document).

\hl. Does your MWE really show the behaviour on your system? Is your system up-to-date? – Ulrike Fischer Jun 23 '15 at 07:43\usepackage{cite}in my MWE. Now it has been added. I need this package to contract [1,2,3,4] to [1-4]. – Indra Yudhistira Jun 24 '15 at 03:44Ref \cite{x}will result in the same error. – LaRiFaRi Jun 24 '15 at 07:22