Hey andreone,
it is because the deafault value of variable2 is 0. On any touch start variable1 is set to sprite.y and this coordinate is immediately over 50 pixels further away from var2 which is still 0.
Set both variables on touch start to the sprites y coord and change just variable 2 on end touch
or set variable2 on start of layout to sprite.y.