Fix broken feature #43 (navigate by clicking in preload indicator)

I also changed a few global vars to local ones (just target, x and y)