Remove invalid symbols.