remove illegal env