fixing bug in reading in chain tree