remove illegal bytes