4 If his master gives him a wife and she bears him sons or daughters, the woman and her children shall belong to her master, and only the man shall go free.

Read Exodus 21:4 Using Other Translations

If his master have given him a wife, and she have born him sons or daughters; the wife and her children shall be her master's, and he shall go out by himself.
If his master gives him a wife and she bears him sons or daughters, the wife and her children shall be her master's, and he shall go out alone.
“If his master gave him a wife while he was a slave and they had sons or daughters, then only the man will be free in the seventh year, but his wife and children will still belong to his master.