[TIMOB-15516] Fixed an overflow bug