If agent starts before users are written the locking mechanism is undefined, so I check for undefined and initialize the lock. Also add event is never heard ....