(WORKING) Fixed logical error in positioning

FUCK YEAH IT WORKS
Swapped 3 operators and two variables in 3 functions.