Fixed the mouse updating bug at the expense of being much less efficient