stuck on dispatcher, added visited flag for early break