Fixed kd tree export