fixing mathjax
fixing some errors occuring when distribution is changed