fixed flash message bug