Updated OrderedMemoryStore to function correctly