bugs fixed for exact matching and highlight

Fixed bugs in the exact matching method and te highlight