with_doc issue fixes