Relationship advice

So I've been with my boyfriend for about a year now. I love him dearly. But my ex keeps popping up, like he sees me driving and messages me or sees me walking and stops to say hi. It is stirring up old feelings. I am not sure what to do. My ex was my first for everything. Sex, love. Is it normal for me to wonder and ask what if? Part of me still loves him even though I have moved on. Or have I not and that is why I feel like this? I feel like it is affecting the way I act around my boyfriend now. Any advice?