Fixed bad bug (no inversions were generated anymore) and fixed mocking