Fixes all redirection issues