multiple bug fixes for reading tree traces and summarizing