fixed flash message problem