fixed bug on cleanup of text