Did I do the right thing?

Hi guys! I want your opinion on something.

I've been having sex with my boyfriend for more than a year only using condom. And I have taken the Morning after pill twice till now.

This weekend I was in my cycle (I still am, actually) and we decided to have sex in the shower. And we did with condom BUT in the end of it, as I looked to his penis I noticed that near to edge of the condom (that "ring") was some esperme. I didn't know if leaked out but I took the morning after pill.

I did the right thing or I didn't need to do that at all?