Fix path finding (now it works!)