Fixes dragging mouse bug