The code is very simple, not much to go wrong. So if it is suggesting children are married incorrectly I would recommend you first double check your data. If they married later, is that marriage date wrong?
If they are OK, give me a link and I’ll look further into it.