fixed memory leak in text.cpp
more box functions