Text using global doesn't update correctly

Hi, I have created a widget with both a pie graph and a number meant to display the same value.

This value is stored in a global and updates using a json from the Web.

When the widget updates, the pie graph updates well, but the number does not change most of the times. I have pies sometimes half full while the number says 0, which has no sense, because they use the same value!

See the attachment : the left pie has a max of 18, the right one has a max of 21, the numbers don't match. Look closely behind the white numbers: the numbers are cloned to look like shadows, so they use the same formula, but they're different too.

Is it a bug, or something I didn't understand?

Thanks