Merged last changes from the dspace master and fix a NPE