Improved checking of unreachable agents
Minor tweaks