Sex with an ex

So I was with this guy for 2 years and we had quickie sex maybe 3 times in those two years we broke up but we still talk via txt and phone calls. We hung out the other day and we ended up having sex passionate kind but afterwards to me it felt wrong. Now I don't know what to do