Fix bug that stored strings incorrectly.