solved bug with localstorage