Fix proposed in Issue #1627

Fixed the Trace.Activity for the line 101. Before is was accessing a null variable.