modified to fix incompatibility with mathjax