Fix MathFunctionSerializer.