Another attempt at fixing path copying