Reworking path logic