Made path detection improvments