Flash message close button works properly