Fixed bug, is terminal node had missing return