repaired empty string bug in TextProcessor