When a thread gets removed, the listen method on main does not check to see if that worker still exists in the "inWork" map. That will throw an error.