Don't be greedy when selecting keywords

@rebeccagill