Fix redirection loop