fix match error overwrite issue