illegal character bug fix