handle paths properly