String assignment bug fix