bug fix on local storage