curl redirect fix