Fixed replacing _id property when using the memory engine