Default Loudspeaker turning on randomly during call

As the title says it turns on without touching the phone, after calling sb. It never seems to turn on while receiving a call. I am 100% I didn't touch a thong as sometimes it happens while I have the phone in hand and I can clearly see that the loudspeaker is activated as soon as I place the call. I read it's a common problem. Anyone found any soulution? Do you have it too?
if you like my post
Devices:
HTC One
ROM : InsertCoin 3.0.2

HTC Sensation
ROM : ViperS 5.0.2 Sense 5