prevent bad path