fix flash message issue