fixed some path finding issues