To save messages after redirecting