Fix big match special redirect bug and improve performance