bug in logging word-pairs