Fixed the memory meta store, added a unit test for it.