Fix duplicate words bug