Fix redirection handler