pan_invert fix