MANTA-17 fix inversion END off by one error