updated issue with factories not referencing themselves