fix bug in illegal character