potmeter returns values 0, 1, 2 & 3 instead of 0 - 1023

I found the problem. I had the potmeter hooked on the 5v and GND of another arduino (the master) and to pin A3 of the slave, where the sketch is running. I didn't think that would matter, but does... Anybody able to explain why?