Fix local storage saving