Pushing off-by-1 in centroid and removed redundant paths