fixed tree reading c-array bug