Fixed bug whenb making collection changes so that index is read correctly and updated accordingly