Wrong hole!!

My partner and I were having sex and decided to try doggy style, during this he accidentally put it in my bum instead, it did hurt a lot. He'd like to try doggy again but I'm worried it will happen again. Any advice?