merge of https://github.com/eprints/eprints/commit/c68f9f93c92d0d76b6c01dfa1f3a2e2a0420b98a