fix octree server crashes on various shutdown corner cases