Any advice?

Hey all, before anything please don’t come at me for feeling this way or judge me. So my boyfriend and I have had a long history together and he’s hurt me so much in the past. We’ve been doing really good now, he respects me, treats me good, he listens to me and he’s not doing anything anymore that could jeopardize our relationship like it’s happened in the past. However, sometimes I have those thoughts like am I doing wrong by being with him after everything he’s done to me in the past? Sometimes I think it’s dumb for me to think that way because he’s doing everything right now, but at times I feel like the past still haunts me and makes me doubt whether I should even be with him. He’s cheated, we’ve broken up and gotten back together, he’s lied and other girls have been involved when we were broken up, so it’s a lot of things that have happened. I don’t know if it’s wrong that I feel that way sometimes, and I totally understand why would I forgive and be with someone like that again after he’s hurt me. I understand that, it’s just deep down I always felt that he could change and be a better man for us. Now that’s he’s been doing everything right, the past still seems to roam in my mind and I tend to feel upset. Like why did he have to do those things, why hurt me like that.