Fix redirection issues