Joystick problem(incorrect values)

_Hi guys, I was working on testing a joystick and using Arduino to read the value from the serial port. But when i read the value, it's pretty weird i don't know how to say. The value is not stay in the middle which is about 511 or 512 whatever instead of that, the entire value is all messed up. I'm using board Arduino UNO R3 SMD(not DIP), a KY-023 joystick and a breadboard.
_Here is my code:

int Xpin=A1;
int Ypin=A0;
int Xvalue;
int Yvalue;
int Spin=5;
int Svalue;





void setup() {
  // put your setup code here, to run once:
pinMode(Xpin, INPUT);
pinMode(Ypin, INPUT);
pinMode(Spin, INPUT);
Serial.begin(9600);
}

void loop() {
  // put your main code here, to run repeatedly:
Xvalue=analogRead(Xpin);
Yvalue=analogRead(Ypin);
Svalue=digitalRead(Spin);
Serial.print("X value=");
Serial.print(Xvalue);
Serial.print(";");
Serial.print("Y value=");

Serial.print(Yvalue);
Serial.print(";");
Serial.print(Svalue);
Serial.println(";");


delay(1000);
}

_Here is my circuit:

(mod edit)

Let's start with something simple.

The white wire from the pot does not appear to be connected to anything. Is that deliberate ?

In this case i don't need the white wire now.

Are the power rails on the breadboard continuous from end to end or is there a gap in the middle?

No there is no gap, everything you guys see in there is brand new products that i bought from yesterday

I don't know but most of the video online tell about how to use the joystick mostly use a DIP not SMD. I thought it was because the SMD but until there is one using the SMD and it works perfectly so t thought it was because of the joystick so i bought two brand new but it's not working.