Fixed a bug, and remove all removed matches from the matches