Fixed a localstorage bug