moving the trace inside the if statement.  Fixes #2