Fixed a bug with trying to output a pointer rather than a string in formula.cpp.