fixing character encoding bug that was adding non breaking spaces to the text