Fix compile errors with debug code enabled.