improve parsing of sub-threads