EDOC-1259, EDOC-1277: fix delete and deleteObject functionality