Fix redirection loop. #932