fix core from allocating too many nodes in top tree