I still think of him?

Okay so, I've been in a relationship with someone for a year and a half. We've known each other a few months longer then that. Lately we've been getting into simple feuds and the simplest thing he says or does irritates me like crazy. A few nights ago I dreamt of my ex and I together as a couple. Me and him were off and on 3 times in 2 years. It's very obvious he only wanted me to do sexual things since he'd mislead me for weeks until we got together and did things, and then stop talking to me the next day and for months on in until he felt like getting some more. Well the last time we got together, I lost my virginity to him officially. We had sex 2 more times after that until I decided to break it off after he randomly texted me a week after ignoring me again. I met my current boyfriend a half a year later and got together 3 months after that. Why can't I stop thinking of my ex all of a sudden since my dream? I think I miss him, or maybe his "attention". I know I will always love him since he was my first awful love but I'm not in love with him. Yet, I'm wanting to be around him and message him?