Fixed no events remaining case
Formatting change