Minor changes to click detection.