Fix for multiple redirect error in last commit