Fixes a bug where renaming elements with _id = None caused deletion of the collection