Fixed some minor text processing issues