fix for minimum path check