I believe it is you that is mis-reading this. Exodus 21 literally say that the baby come forth, as in a premature birth, not a miscarriage. Nowhere in the verses does it say that the baby dies. Also, if the baby is born alive then the punishment is for any further harm that comes to the mother...