Fixed redirection loop on setup