fixed bug in equal trigrams