Fix compilation with trace enabled

A couple of variables were missing.