Bug fix in matching from keywords