fix delete words and flash message