TIMOB-12577-added boundary condition for width

Added boundary condition for width so that it doesn't exceed max width.