Small fixes on pathfinding in lua.