fix some flash messages aren't shown properly