Fixed redirection bug