Fix parsing json from localStorage