Please replace ~ by $\approx$.  (I think I remember ~ does not compile.  Does it in your installation?)