fix potential memory leak in SpatialTree (thanks to Bahram)
Merge branch 'production'