Fix bug with truncation in LocalStorage