Fix localstorage saving issues.