some changes in redirecting