Fix add with mainIndex and no model