fix a bug that prevented copying a document with slots