Plaintiff, W.R.S., appeals the judgment of the juvenile court dismissing his paternity action on the basis of res judicata. We reverse and remand with directions to reinstate the action. On June 5, 1974, plaintiff, as putative father of a minor child, filed a petition to determine paternity pursuant to C.R.S. 1963, 22-1-3(5). On September 5, the court dismissed the action, specifically concluding that plaintiff was not authorized under the statute to bring such an action. On April 29, 1977, plaintiff filed a declaratory judgment action seeking a determination of paternity. Finding that the prior dismissal was with prejudice pursuant to C.R.C.P. 41(a), the trial court dismissed the declaratory judgment action without prejudice.