What is going on with my ex?

I just got home from visiting my now ex boyfriend of 1 year. We currently live in diffrent states and i flew out to see him last Sunday, i was suppose to stay with him for 3 weeks but we broke up. About a month ago he started acting diffrently he blamed it on the distance. Then something still felt wrong when i saw him in person. He has been seperated from his wife of 3 years for a year so i asked him how his relationship was with her as they still have not divorced. He said he was still with her for money reasons but admitted he missed her and wishes they tried harder to stay together. he told me he needed to be alone and find himself. So I left and as soon as I got home he texted and called me like nothing happnened calling me baby asking how my day is. I let him know I needed my space and didn't want him to contact me that he needs to move on and figure things out. What is going on with him? he's 26 im 22 by the way