fixed theoremchck's ~ handling