Fix rebuild tree method signature