Fix some typos and compilation errors (TRACE disabled)