Pain during sex

So this past weekend me & my boyfriend decided to go ahead & have sex & I just got off my period a couple days before.. Sometimes it would hurt & other times it would just be uncomfortable. He was worried he was doing it but I'm not sure if it was just that my cervix was still low or something.. Help?