make auto-doc generation more robust