Fix single-doc mode detection