Increased performance by changing the pathfinding.

-> tested with profiler.