added fix for initialising local data and sometimes pathfinder is working