bug fix - stopping agents took way too long
enhanced performance