Fixing the behavior of the agents to avoid deadlock.

Signed-off-by: Stéphane Galland <galland@arakhne.org>