Fixed error which was generating subtrees too deeply.