multi-thread safe porting

Functoin storeBadvents commented out because it asks for the get of a ME in the step1.