Bugfixes after testing MathText and MathImage