fixed NaN problem on fast drags; failed on closestLine