reduce path fixed infinite loop error