reset($messages) may be safer (I don't always remember if flash messenger only have integer key)