questionable

So my boyfriend and I went two rounds and we used condoms both times but the 2nd time he took it off then put it back on, like before we started, is that ok to do? And I had just started taking the pill 9 days previous. Should I be concerned about pregnancy?