bugfix for trace dumping & improved trace array detection