Fix 500 error if no events selected