fix saving all data to localstorage