Fix whitespaces of text extraction