solve the issue of redirecting