You did fine. I'm not a big fan of just telling the dog no. "No" is an abstract command that can mean don't chew that sock, don't eat the cat food, quit barking, don't jump on me, you get the idea. It's too generalized of a command and it doesn't really tell the dog what it *should* be doing. IMO you did good by telling him to sit. If he breaks the sit THEN you can correct him and re-sit him and then he KNOWS what he is being corrected for. If you can keep his focus on you and not break a sit he will be too busy to be distracted by a child and can then get used to them being around safely.