Bug fixes with mousemove event