modified the anti-message handling function for situation where the negative event may/may not be the smallest event in the unprocessed queue