Issue #23246:fix weight calculation
Merge pull request #1390 from gpazo/23246

Issue #23246:fix weight calculation