CAS redirect fix