Trying to fix illegal character problem