Replace invalid sequence