Fixes two bugs: URLs with "%" and terms containing shorter terms.