renderMath method fix