Fix some performance issues when mousemove