Fixed bug with flash message