fixes memory index concurrent reads/writes error