S4 Earphones connected mode, when they're not... not like all the others

A

AC Question

My S4 gives the earphones connected mode, when no earphones have been connected to the jack.

however this problem will come on and off with no specific pattern, when charging it usually shows that the headphones are connected, but when disconnected from the charger the problem stops but not always, sometimes the mode will come on and off multiple times in one minute when i connect headphones.

The phone got some sea water damage, from wet hands around 2 months ago. I can get my hands on a jack replacement and a charging dock replacement, but i'm not sure if the problem could from the motherboard.

After opening the device the only visible corrosion was on the display cable/chip, this made the display go crazy at the start but right now the phone works normaly except for the earphone problem.

Sorry for the long post but i really don't want to fork out a lot of money on a new device and hope someone can help :)