Increase protection for DEBUG messages and fix ATR-21084 I really don't know why this did not trigger an issue before.. Maybe someone copy+paste some old code?