in-document references, fix #5