Fix term tags and word output