Fix bug in session store.