remove bad paths