fixed string corruption bug