fix invalid paths