Fixed an error which caused a "no such element" exception when the store was exited.