Fix an overflow point causing wrong chained path