Fix the logic for coalescing the event queue

Change-Id: Ib64789477eb4ed6c6b17aaf76723e511e9ae610a