fix trigram