remove trailing spaces
When storing the already matched terms, be case-insensitive #10744