I didn't check the X and Y positions separately. I just copied the global variables into local ones and it worked.Oh dear, looks like it works for the x location but I screwed something up for the y location. Fix incoming....
Thanks for a really great program!