used to detect double-click problem