Fixed crash on distanceAtTick