Fix TM/TC inversion with PI/RI