Invalid redirect fix