Core: small fixes when building in TRACE mode

Signed-off-by: Eduardo Silva <eduardo@monkey.io>