fix inverse order