Trying to fix circular redirect error