More robust redirecting