fixed bug with empty local storage