added an optimization in fire() for pending events