localStorage wasn't read properly