Fixes flash messages spam (#6631)