Small fixes in text processing part