Fix invalid paths.