Fixed a bug where local storage key was undefined