Pointer out of sync with mouse pointer

Hey. I made a function that puts a crosshair on the scene that moves with the mouse pointer. The first time the scene is loaded the crosshair is out of sync with the pointer. This is solved by hitting F12 to load the debugger and then closing it. In this gif you can see i cannot get to the bottom of the screen but once I to the debugger trick i can.

How can I solve this? Thanks!!

sample|526x500