removed bug with empty localstorage