remove illegal characters