Potentiometer not working after connected to wires
I'm fairly new to electronics and I'm trying to learn it with my Arduino. Recently I have been working on a project that involves 4 potentiometer(pot). I'm using one 1k pot and 3 10k pot. The pot is used to send signals to the analog inputs of the arduino. To test the pots I used a simple serial.println program that sends the value of the pot from 0 - 1023. When I connect the pot through its 3 pins directly to the breadboard, all of them work perfectly fine and gives me a stable value as I turn the pot.
However, when I soldered three wires to them each, 2 of them work and 2 of them didnt. The 1k and one of the 10k pot didnt work. When I connected it through its wires, the values it gave kept jumping even when I'm not turning the knob and sometimes it will just stay one value when I'm turning it or not. Why is this happening? Did I overheat the pot when soldering?
I took some new pots and tested them again through the pins directly and it worked perfectly fine. But when I soldered the wires to it, this time the 10k worked fine and the 1k didnt work. It gave the same problem as the ones before.
Please help me with this problem. I have attached the pictures of the pots that didn't work. Please help me check if my soldering is anything wrong. I have checked online couldn't fine anyone experiencing the same problem.