Attempt 5: Trying to fix illegal char problem