Fixed inversion issue