Fixed bug about removing matches