Removing redrirect loop