Fixes flashes runtiming on emp_act()

Fixes flash messages spam (#6631)

Some code cleaning