Broken Condom!

Me and my boyfriend had sex while on my period, the condom broke but he didn't cum inside me but had previously ejaculated into a condom. I was worried even though I wasn't in my fertile phase and got the morning after pill just to be safe. The week after we had sex again, and I was in my fertile phase and the condom broke again but he didn't cum. I really don't want to be pregnant and I was just wondering if anyone could help settle my worries??
Also why does the condom keep breaking??