fix spatial iterator