Unless the court finds, after a consideration of all relevant circumstances, including the effect of a retroactive judgment on third parties, that the interests of justice would be served by making the judgment not retroactive, it shall declare the marriage invalid as of the date of the marriage. The provisions of this Act relating to property rights of the spouses, maintenance, support of children, and allocation of parental responsibilities on dissolution of marriage are applicable to non-retroactive judgments of invalidity of marriage only.
750 ILCS 5/304