Fix invalid pathname