implementing invenio fix #2458 to b2share (issue #481)

implementing invenio fix #2458 to b2share (issue #481)