fixed a memeory leak with the text