Rebuild tree