Fixed cursor location on window resize bug