save refs when saving main model