fix a flawed inversion