fix --docs, fix #1537