Fixed quadtree bugs