Mouse and touch event fixes.