Fixed Bug where mosue position is inaccurate after window is resized