minor changes to text.cpp