fixing flash messages