Events: fixed horizontalDistanceTreshold undefined