Ported a small bug fix for the issue where the mouse state wasn't changed when the button was released.