[PATCH] idmouse cleanup and overflow fix