path detection fix