fix bug in MemoryStore.getPage function