Fixed flash message duplication issue