AI unable to find correct path