fixes external path function.