Update fields produces incorrect TOC

Hello. We have an issue when using UpdateFields(). We found out that it is not working at the moment of generating the table of contents. In some documents it just adds extra lines to the TOC without working links.
Using the attached example, it generates the contents correctly, except for the number of pages
Field Update issue - template.top.docx (80.3 KB)

. (IE: Title C starts at page 48, but in the TOC says it starts at 49).

Please let me know if you need further information or examples. I hope you can help me with this one. We are using version 24.3.0. Thank you in advance.

@ruben.manjarrez.tr The document uses hyphenation. You should enable this feature as described in our documentation by providing the required hyphenation dictionaries:
https://docs.aspose.com/words/net/working-with-hyphenation/

The following code produces correct result:

Hyphenation.RegisterDictionary("en-GB", @"C:\Temp\hyph_en_GB.dic");
Hyphenation.RegisterDictionary("de-DE", @"C:\Temp\hyph_de_DE.dic");

Document doc = new Document(@"C:\Temp\in.docx");
doc.UpdateFields();
doc.Save(@"C:\Temp\out.docx");

I have used OpenOffice hyphenation dictionaries so there might be slight difference if compare to MS:
dic.zip (309.6 KB)