fix duplicate flash messages